package com.woniu.mapper;

import com.woniu.entity.FlowerComment;
import com.woniu.vo.FlowerCommentVo;
import com.woniu.vo.FlowerCommentVoCZT;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface FlowerCommentMapper extends Mapper<FlowerComment> {
    FlowerCommentVo selectFlowerCommentByCommentId(FlowerComment flowerComment);
    
    List<FlowerCommentVo> selectAllFlowerComments( String flowerName, String accountName, String startTime, String endTime, Integer rateScore, Integer isDelete);

    //List<FlowerCommentVo> selectAllFlowerComments();

    List<FlowerCommentVo> findAllFlowerComments() throws Exception;

    List<FlowerCommentVo> findAllFlowerCommentsByConditions(FlowerCommentVo flowerCommentVo) throws Exception;



    List<FlowerComment> selectAllByAccountId(Integer accountId);

    List<FlowerCommentVoCZT> selectAllFlowerCommentVoByAccountId(Integer accountId);

    List<FlowerCommentVoCZT> findAllFlowerCommentVoByAccountIdAndFlowerId(@Param("accountId") Integer accountId, @Param("flowerId") Integer flowerId);

    int insertComment(FlowerComment flowerComment);

    int updateOrderIsCommentByOrderId(@Param("orderId") Long orderId, int IsComment);

    int updateOrderItemByCartId(@Param("cartId")Integer cartId,@Param("contentId") Integer contentId);
}